define(["jquery","template","bbcare","bch/template/patientManager/nutritionList.tpl"],function($,template,$bb,tpl){
	var ui = {};

	var drawDatatableForm = function(data){
		return template("tpl_nutritionList_datatableForm",data);
	}
	var drawDatatableBox = function(data){
		return template("tpl_nutritionList_datatableBox",data);
	}

	ui.datatableForm = function(options){
		$("#" + options.id).html(tpl.datatableForm());
		var h = drawDatatableForm(options);
		$("#" + options.id).html(h);
	}
	ui.datatableBox = function(options){
		options.dom.html(tpl.datatableBox());
		var h = drawDatatableBox(options);
		options.dom.html(h);
	}

	return ui;
});